package main.java.design.composite;

/**
 * <p>
 *     组合模式
 * </p>
 *
 * @author : wangdejian
 * @version 1.0
 * @date : 2020/6/16 20:41
 */
public class Client {
    public static void main(String[] args) {

        Folder folder = new Folder("design");
        Folder folder2 = new Folder("composite");
        folder.add(folder2);

        File file = new File("Component.java");
        File file2 = new File("File.java");
        File file3 = new File("Folder.java");

        folder.add(file);
        folder.add(file2);
        folder.add(file3);
        folder.display();



    }
}
